import React, {Component} from 'react';
export default class Time extends Component {
  constructor() {
    super();
    this.state = {
      time: new Date().toLocaleTimeString()
    }
  }
  render() {
    return <div>
      <h1>当前时间：{this.state.time}</h1>
    </div>
  }
}